package com.yihusitian.zsxq.sg.generator;

import com.google.common.collect.Sets;
import com.yihusitian.zsxq.sg.config.BaseClassInfo;
import com.yihusitian.zsxq.sg.util.CommonInfoHolder;

import java.util.Set;

/**
 * @Description TODO
 * @Author LeeHo
 * @Date 2020/8/26 19:50
 */
public class MapperSourceGenerator implements SourceGenerator {

    @Override
    public Set<String> getImportSet() {
        return Sets.newHashSet(String.format(IMPORT_TEMPLATE, generateConfigHolder.getDoInfo().getPackagePath(),
                CommonInfoHolder.getCurrentBusinessName() + generateConfigHolder.getDoInfo().getClassNameSuffix()));
    }

    @Override
    public BaseClassInfo getBaseClassInfo() {
        return generateConfigHolder.getMapperInfo();
    }
}